﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate;
using NHibernate.Cfg;

namespace InnovTech.Persistence
{
    /// <summary>
    /// Provides the function to build a ISessionFactory of NHibernate
    /// </summary>
    public interface ISessionFactoryBuilder<TDatabaseInfo>
        where TDatabaseInfo : INHDatabaseInfo
    {

        TDatabaseInfo DatabaseInfo { get; }

        /// <summary>
        /// Builds a <see cref="ISessionFactory"/>
        /// </summary>
        /// <returns>An <see cref="ISessionFactory"/> instance</returns>
        ISessionFactory BuildSessionFactory();

        /// <summary>
        /// Builds a <see cref="Configuration"/> to build the <see cref="ISessionFactory"/>
        /// </summary>
        /// <returns></returns>
        Configuration BuildConfiguration();
    }


}
